This invention relates to MPEG multimedia data, and more preferably to compression and decompression of MPEG data.
Multimedia data including audio, still video and motion video data is being widely used in video games, internet-related applications and other data processing related applications. As is well known to those having skill in the art, multimedia applications often require large quantities of video and audio data. In order to store and process large quantities of data, international standards for coding audio and video data have been prepared by the Moving Picture Expert Group (MPEG). Examples of MPEG standards are MPEG-1 and MPEG-2 standards. MPEG standards are widely used with multimedia data and need not be described further herein.
MPEG-1 or MPEG-2 standard data that has been compressed may be restored or decompressed using an MPEG-1 or MPEG-2 decoder. More specifically, MPEG data may include intra picture data, predictive picture data and bidirectionally predictive picture data. Moreover, each picture generally includes a luminance signal and a chrominance signal. Accordingly, notwithstanding the existence of MPEG compression and decompression, large size memories may still be needed to store multimedia data.
In one specific example, if the number of horizontal pixels are 720 and 480 respectively, the numerical value for discrimination between black/white and color signal is 2, and the number of bits per pixel is 8, in order to store all of the intra picture, predictive picture and bidirectionally predictive picture data, the total amount of data to be stored may become 720xc3x97480xc3x973xc3x978xc3x972 or 15.2 Mbits. Accordingly, 15.2 Mbits of data may need to be stored in a memory to process the three pictures.
FIG. 1 is a block diagram of a conventional MPEG system decoder. Referring to FIG. 1, a conventional MPEG system decoder includes an MPEG bitstream decoder 10, a memory management processor 12, a memory 14, an MPEG video restorer 16 (decompressor), and a video output processor 18. The video output processor 18 provides video data to a display, such as a TV. It will be understood that the block diagram of FIG. 1 illustrates only blocks for processing video data.
The MPEG bitstream decoder 10 receives an MPEG bitstream and separates the bitstream into video data, audio data, and system data. The memory 14 stores therein compressed video and audio data, and restored video and audio data. The MPEG video restorer 16 restores the compressed video data output from the memory 14 and provides the restored video data to the memory 14. The memory management processor 12 controls the generation of addresses for storing or reading data in/out of the memory 14. The video output processor 18 outputs the restored video data from the memory 14 to a video display.
A data processing method performed by a conventional MPEG system decoder of FIG. 1 will now be described. Specifically, the memory management processor 12 stores the MPEG-compressed video data separated by and output from the MPEG bitstream decoder 10 in a compressed video data storage region of the memory 14. The memory management processor 12 then outputs the MPEG-compressed video data stored in the memory 14 to the MPEG video restorer 16. The MPEG video restorer 16 restores the MPEG-compressed video data. The memory management processor 12 stores the video data restored by the MPEG video restorer 16 in a restored video data storage region of the memory 14. The memory management processor 12 outputs the restored data stored in the memory 14 to the video output processor 18.
As described above, according to a conventional data processing method performed by a conventional MPEG system decoder, the video data restored by the MPEG video restorer 16 is stored in the memory 14 as is. Unfortunately, the storing of video data in the memory 14 may require an excessive amount of storage capacity. The large storage capacity may increase the cost and/or decrease the performance of the system that processes MPEG data.
It is therefore an object of the present invention to provide improved storage of MPEG data.
It is another object of the invention to provide compression of MPEG data to allow reduction in the storage space that need be used by the data.
These and other objects are provided, according to the present invention, by methods, systems or apparatus and computer program products that compress MPEG data by obtaining difference values between succeeding adjacent data values of MPEG video data and store the difference value if the difference value is less than a predetermined range. By storing the difference values rather than the data values if the difference value is less than a predetermined range, compression may be provided for MPEG data.
More specifically, according to the present invention, a series of data values of MPEG video data is separated from an MPEG bitstream. Difference values are obtained between succeeding adjacent data values of the MPEG video data. For each data value, the data value is stored if the difference exceeds a predetermined range, and the difference value is stored if the difference value is less than the predetermined range. A conversion flag is also stored for each data value, to indicate whether the data value or the difference value is stored. As an example, the predetermined range may be between xe2x88x929 and 8.
According to another aspect of the present invention, after the data value or difference value is stored for each data value, a determination is made if the data values and difference values that were stored exceed a predetermined size. Each data value is divided by 2, and the divided data values are stored if the data values and difference values that were stored exceed the predetermined size. On the other hand, if the data values and difference values that were stored are less than the predetermined size, dummy bits may be added to the data, so that the data that was stored equals the predetermined size. A mode flag may be used to indicate whether difference values or divided values are stored.
Accordingly, MPEG data may be compressed by separating a series of n data values of m bits each of MPEG video data from an MPEG bitstream to obtain mxc3x97n bits of MPEG video data. The mxc3x97n bits of MPEG video data are compressed into (mxc3x97n)xe2x88x92n bits using adjacent value differencing and data value dividing. The (mxc3x97n)xe2x88x92n bits of compressed MPEG video data is stored.
Preferably, the (mxc3x97n)xe2x88x92n bits of compressed MPEG video data include n 1-bit conversion flags to indicate whether the data value or the difference value is stored for each of the n data values. A plurality of dummy bits are also preferably included, if needed, to increase the size of the compressed video data to (mxc3x97n)xe2x88x92n bits. Finally, the (mxc3x97n)xe2x88x92n bits of compressed MPEG video data also preferably include a 1-bit mode flag, to indicate whether difference values or divided values are stored.
The compressed MPEG data may be decompressed or restored by adding a compressed data value to an immediately preceding decompressed data value to obtain an associated decompressed data value if the conversion flag that is associated with the data value indicates that the difference is stored. Adjacent data value adding is preferably performed only if the mode flag has a first value to indicate that differencing was used in compression. If the mode flag has a second value, indicating that dividing was used to compress, then each compressed data value is multiplied by 2 to decompress the data.
Accordingly, (mxc3x97n)xe2x88x92n bits of compressed MPEG video data are decompressed into a series of n data values of m bits each of decompressed MPEG video data using adjacent data value adding and data value multiplying. The (mxc3x97n)xe2x88x92n bits of compressed MPEG video data include n 1-bit conversion flags to indicate whether the data value or adjacent data value adding is used to decompress each of the n data values. The (mxc3x97n)xe2x88x92n bits of compressed MPEG video data also preferably include a plurality of dummy bits that increase the size of the compressed MPEG video data to (mxc3x97n)xe2x88x92n bits, if needed. A 1-bit mode flag is also preferably included to indicate whether difference values or divided values are stored.
Accordingly, the storage capacity of a memory that stores MPEG video data may be reduced by compressing the restored data using differencing and division and then decompressing the stored data as needed. As will be appreciated by those of skill in the art, the present invention may be embodied as methods, apparatus (systems) and/or computer program products.